package gewu.suleju.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Result对象",description = "封装接口返回给前端的数据")
public class Result implements Serializable {
    @ApiModelProperty(value = "响应状态码",dataType = "string")
    private String code;//状态码,真实的开发中,此处应该是使用枚举类型

    @ApiModelProperty(value = "响应状信息",dataType = "string")
    private String msg;//
    // 对行为进行一个描述

    @ApiModelProperty(value = "响应状内容",dataType = "object")
    private Object content;//返回出去的结果

    public Result(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}